import React from 'react';
import { Layout, Statistic } from 'antd';
import { useSelector } from 'react-redux';

function Welcome() {
  const { components } = useSelector(state => state.componentInfos);
  
  return (
    <Layout.Content style={{ padding: '24px' }}>
      <h1>欢迎使用Cookie组件文档系统</h1>
      <Statistic 
        title="扫描到的组件数量" 
        value={components.length} 
        style={{ marginBottom: '24px' }}
      />
      <p>请从左侧菜单选择组件查看详细文档</p>
    </Layout.Content>
  );
}

export default Welcome;